package cn.iocoder.yudao.module.reading.dal.dataobject.community;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 社区用户频控 DO
 *
 * @author 芋道源码
 */
@TableName("community_user_limits")
@KeySequence("community_user_limits_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CommunityUserLimitDO extends BaseDO {

    /**
     * 频控ID
     */
    @TableId
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 频控类型：post-发帖, comment-评论
     */
    private String limitType;

    /**
     * 限制日期
     */
    private LocalDate limitDate;

    /**
     * 当前次数
     */
    private Integer currentCount;

    /**
     * 最大次数
     */
    private Integer maxCount;

    /**
     * 重置时间
     */
    private LocalDateTime resetTime;

}
